<html>
<head>
<link href="{$siteinfo.tempdir}images/index.css" rel="stylesheet"
	type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="inc/js/jquery.js" type="text/javascript"></script>
<script src="inc/js/jquery-chekform.js" type="text/javascript"></script>

<!---->
<script language="javascript">
$(function(){

$("#fm_name").blur(function(){
var chkval=$("#fm_name").val();
	 $.ajax({       
   //   type: "POST",
      url: "do/ajax/aj_admin.php",
      data: "action=chkmembername&chkval="+chkval,
      success: function(msg){
          if(msg=='true'){
		      $("#nameerr").show();
              $("#nameerr").html('<span class="nwring"></span><span>用户名已存在！</span>');
        	  $("#sub").attr("disabled","disabled");
           } else
		   {
		    $("#sub").removeAttr("disabled");
		    $("#nameerr").hide();
		   }      
          }
       });

});



//提交验证部分
$("#sub").chkform([
/*{if $smarty.get.action eq 'add'}*/
{"name":$("#fm_name"),"where":$("#errmsg"),"value":"<div class='errbox'><span class='nwring'></span><span>用户名不能为空！</span></div>","type":"chkblank"},
{"name":$("#fm_password"),"where":$("#errmsg"),"value":"<div class='errbox'><span class='nwring'></span><span>密码不能为空！</span></div>","type":"chkblank"},
/*{/if}*/
{"name":$("#fm_mail"),"where":$("#errmsg"),"value":"<div class='errbox'><span class='nwring'></span><span>邮件不符合规则！</span></div>","type":"mail"}
]);
})


</script>

</head>

<body>
<form name="form1" method="post" action="" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="100%" class="list black" colspan="2">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="86%" align="center" class="black">信息设置</td>
				<td width="14%"><a href="javascript:history.go(-1)"><img
					src="{$siteinfo.tempdir}images/list_add3.gif" width="84"
					height="26"
					onMouseOver="this.src='{$siteinfo.tempdir}images/list_add4.gif'"
					onMouseOut="this.src='{$siteinfo.tempdir}images/list_add3.gif'"
					border="0" /></a></td>
			</tr>
		</table>
		</td>
	</tr>

	<tr>
		<td class="list-add1 pl8" colspan="2" style="display: none"
			id="errmsg"></td>
	</tr>

	<tr>
		<td height="40" align="right" class="list-add1">用户名：</td>
		<td class="list-add1 pl8"><!--{if $smarty.get.action eq 'edit'}-->
		<span>{$memberinfo.name}</span> <!--{else if $smarty.get.action eq 'add'}-->
		<div style="float: left"><input name="fm_name" type="text" size="30" value="" id="fm_name" /> </div>
	<div class="serrbox"  id="nameerr" style="float: left;display:none"></div>
		<!--{/if}-->
		</td>
	</tr>
	
	<tr>
		<td height="40" align="right" class="list-add1">类型：</td>
		<td class="list-add1 pl8">
		{html_select options=$member_type name='fm_membertype' selected=$memberinfo.membertype id='fm_membertype'} </td>
	</tr>

	<tr>
		<td height="40" align="right" class="list-add1">城市：</td>
		<td class="list-add1 pl8">
		
		{html_select options=$citylist name='fm_city' id='fm_city' selected=$memberinfo.city}
		
		</td>
	</tr>
	
	
	<tr>
		<td height="40" align="right" class="list-add1">密码：</td>
		<td class="list-add1 pl8" style="float: left">
		<div style="float: left"><input name="fm_password" type="password"
			size="30" value="" id="fm_password" /></div>
		<!--{if $smarty.get.action eq 'edit'}-->
		<div class="srightbox" style="float: left"><span class="wring"></span><span>密码不修改，请留空！</span></div>
		<!--{/if}--></td>
	</tr>

	<tr>
		<td height="40" align="right" class="list-add1">邮件：</td>
		<td class="list-add1 pl8"><input name="fm_mail" type="text"
			size="50" value="{$memberinfo.mail}" id="fm_mail" /></td>
	</tr>
	
	<tr>
		<td height="40" align="right" class="list-add1">手机：</td>
		<td class="list-add1 pl8"><input name="fm_tel" type="text"
			size="50" value="{$memberinfo.tel}" id="fm_tel" /></td>
	</tr>
	

		
	<tr>
		<td height="40" align="right" class="list-add1">积分：</td>
		<td class="list-add1 pl8"><input name="fm_integral" type="text"
			size="6" value="{$memberinfo.integral}" id="fm_integral" /></td>
	</tr>


	<tr>
		<td align="center" class="list-add1" colspan="2" style="padding: 20px">
 <input type="submit"
			value="提&nbsp;&nbsp;交&nbsp;&nbsp;信&nbsp;&nbsp;息" name="sub" id="sub"  /> 
			<!--{if $smarty.get.action eq 'edit'}-->
		<input type="hidden" name="action" value="update" /> 
		<input
			type="hidden" name="fm_id" value="{$smarty.get.id}" />
		<!--{else if $smarty.get.action eq 'add'}--> <input type="hidden"
			name="action" value="insert" /> <!--{/if}--></td>
	</tr>
</table>
</form>

<table width="102%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>&nbsp;</td>
	</tr>
</table>

</body>
</html>
